package mn.idax.exchange.otc.config;

import org.atmosphere.cpr.AtmosphereServlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ChatServletConfig {

    @Bean
    public ServletRegistrationBean servletRegistrationBean() {
        ServletRegistrationBean servletBean = new ServletRegistrationBean(new AtmosphereServlet(), "/order/*");
        servletBean.addInitParameter("org.atmosphere.cpr.packages", "mn.idax.exchange.otc.*");
        servletBean.setOrder(0);
        return servletBean;
    }
}
